/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

#ifndef PLJAVA_DESCRIPTOR_VALUE_H
#define PLJAVA_DESCRIPTOR_VALUE_H

#include <PLJavaFile.h>

namespace PLSDK {

/**
 * Base class for all java descriptor values.
 */
class PLJavaDescriptorValue {
public:
    /**
     * The types for the descriptor.
     */
    enum DescriptorType {
        /**
         * signed byte
         */
        Byte            = 0,
        /**
         * Unicode character
         */
        Char            = 1,
        /**
         * double-precision floating-point value
         */
        Double          = 2,
        /**
         * single-precision floating-point value
         */
        Float           = 3,
        /**
         * integer
         */
        Int             = 4,
        /**
         * long integer
         */
        Long            = 5,
        /**
         * an instance of class <classname>
         */
        Reference       = 6,
        /**
         * signed short
         */
        Short           = 7,
        /**
         * true or false
         */
        Boolean         = 8,
        /**
         * one array dimension
         */
        Array           = 9,
        /**
         * Void
         */
        Void            = 10
    };
    /**
     * Constructor.
     */
    PLJavaDescriptorValue();
    /**
     * Get the descriptor type.
     *
     * @return The type.
     */
    inline PLJavaDescriptorValue::DescriptorType type();
protected:
    PLJavaDescriptorValue::DescriptorType m_type;
};

PLJavaDescriptorValue::DescriptorType PLJavaDescriptorValue::type() {
    return m_type;
}

}

#endif
